<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let str = 'Hello, World'
        console.log(str.substring(1, 4))
        console.log(str.slice(-3))
        console.log(str.split(','))
        console.log(str.indexOf('l', 3))

        console.log(str.endsWith('ld'))
        console.log(str.startsWith('Hel'))

        console.log(str.replace('l', '0'))

        // console.log('x'.padEnd(3,"f"))
        // console.log(str.charAt(0))

        function getStr() { 
            return str.slice(-3)
        }

        console.log('标签:',getStr`Hello World`)
    </script>
</body>
</html>